Skip to content

Conversation

@surendrababuravella
Copy link
Collaborator

SUMMARY

New module zos_started_task which support start, display, modify, cancel, stop and force operations.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

zos_started_task

ADDITIONAL INFORMATION

AndreMarcel99 and others added 30 commits July 12, 2025 10:58
* Change interface

* Remove lines

* Update documentation

* Move steps out of ret_code

* Adjust documentation for steps and module

* Replace steps on test suite

* Fix documentation

* Add fragment

* Update changelogs/fragments/2204-Update_zos_job_query_module.yml

Co-authored-by: Fernando Flores <[email protected]>

* Fix null for none

---------

Co-authored-by: Fernando Flores <[email protected]>
Co-authored-by: André Marcel Gutiérrez Benítez <[email protected]>
* Test

* Modify action job submit

* Replace structure for empty jobs

* Modify structure

* Modify test to properly test new interface

* Modify test on base of job submit new interface

* Be alignt

* Modify job submit

* Add fragment

* Better fragment

* Update documentation

* Fix commit

* Fix documentation

* Keep documentation

* Replace job submit

* Fix sanity

* Fix sanity

* Return values

* Return values to module

* Return values to test suite and empty response

* Update changelogs/fragments/2208_update_job_modules_interfaces.yml

Co-authored-by: Fernando Flores <[email protected]>

* Update changelogs/fragments/2208_update_job_modules_interfaces.yml

Co-authored-by: Fernando Flores <[email protected]>

* Update changelogs/fragments/2208_update_job_modules_interfaces.yml

Co-authored-by: Fernando Flores <[email protected]>

* Fix job submit

* Validate test case

* Validate test case

* Validate test case

* Validate test case

* Validate test case

* Validate test case

* Validate test case

* Update changelogs/fragments/2204-Update_zos_job_query_module.yml

Co-authored-by: Alex Moreno <[email protected]>

* Update plugins/modules/zos_job_submit.py

Co-authored-by: Fernando Flores <[email protected]>

* Update plugins/modules/zos_job_submit.py

Co-authored-by: Fernando Flores <[email protected]>

* Update plugins/modules/zos_job_submit.py

Co-authored-by: Alex Moreno <[email protected]>

* Update plugins/modules/zos_job_submit.py

Co-authored-by: Alex Moreno <[email protected]>

* Update changelogs/fragments/2208_update_job_modules_interfaces.yml

Co-authored-by: Alex Moreno <[email protected]>

* Update changelogs/fragments/2208_update_job_modules_interfaces.yml

Co-authored-by: Alex Moreno <[email protected]>

* Update changelogs/fragments/2208_update_job_modules_interfaces.yml

Co-authored-by: Alex Moreno <[email protected]>

---------

Co-authored-by: André Marcel Gutiérrez Benítez <[email protected]>
Co-authored-by: Fernando Flores <[email protected]>
Co-authored-by: Alex Moreno <[email protected]>
* Added changes to the options in zos_operator_action_query

* Modified tests for test_zos_operator_action_query regarding option names

* Updated literal default value to true

* Updated ocurrences of message to msg

* Updated test with new msg_ instead of message_

* Updated unit tests and date

* Updated date in unit tests

* Updated zos_operator_action_query with aliases

* Added a missing comma

* Ensured that all values are always returned

* Updated zos_operator_action_query

* Added changelog

* Corrected doc
* Release tasks v1.14.0 GA (#2189)

* [v1.14.0] Avoid failures when default dir ~/.ansible/tmp/ is not previously created and fix failures when using become in zos_job_submit (#2109)

* Updated plugins in zos_copy

* Updated action zos_job_submit

* Updated tests

* Updated permissions

* Added fix for content

* Added changelogs

* Updated zos_job_submit action plugin

* Fixed sanity issue

* Updated zos_copy

* Started release process

* Updated lifecylce

* Updated meta

* Updated zos_mount docs

* Updated docs

* Updated data set utils

* Updated release notes

* Updaded lifecycle

* [Release] Merge release tasks for v1.14.1 to main (#2200)

* [1.14.1][zos_copy] Fix permission denied when transferring file to managed node with non-root user (#2198)

* Updated issue template

* Added fix for wrong permissions set in zos_copy

* Removed comment

* Fixed sanity isseu

* Added changelogs

* Added changelog and release notes

* Updated release notes

* Modified release notes

* Merged release tasks into staging (#2219)

* updated galaxy.yml with versioning

* updating versions and dates.

* version summary block

* changelog work

* ac document run

* release notes updated.

* cleaned up antsibull run, verified new version is in changelog

* correction to release notes

* Fixed release notes

* removed all the changelog fragments

---------

Co-authored-by: Rich Parker <[email protected]>

Updated release notes

* Merged from main
* Updated zos_encode

* updated test cases

* Updated encoding tests

* Added encoding dictionary to the docs

* Updated changelogs

* Fixed docs

* Update zos_encode.py
* Test

* Alter names

* Remove and add values to parameter validation

* Replace on test suite

* Replace fix

* Add option to replace to work properly

* Debug

* Fix checksum

* Fix pushed checksum

* Fix copy

* Fix changes on job utilities

* Debug test

* Debug test

* Complete validation

* Validate copy

* Fix copy allocate

* Fix testing validations

* Fix str

* Debug

* Debug line

* Debug

* Return copy for zoau call

* Try validate force work

* Add fragment

* Try validate force work

* Fix sanity

* Modify fragment

* Update plugins/modules/zos_copy.py

Co-authored-by: Fernando Flores <[email protected]>

---------

Co-authored-by: André Marcel Gutiérrez Benítez <[email protected]>
Co-authored-by: Fernando Flores <[email protected]>
* Test

* Fix test xos operator

* Fix tab

* Fix tab

* Fix tab

* Fix tab

* Fix tab

* Fix tab

* Fix tab

* Fix tab

* Add fragment

* Fix sanity

* Update changelogs/fragments/2230_zos_operator_interface_update.yml

Co-authored-by: Alex Moreno <[email protected]>

* Update changelogs/fragments/2230_zos_operator_interface_update.yml

Co-authored-by: Alex Moreno <[email protected]>

* Update plugins/modules/zos_operator.py

Co-authored-by: Alex Moreno <[email protected]>

* Update plugins/modules/zos_operator.py

Co-authored-by: Alex Moreno <[email protected]>

* Update plugins/modules/zos_operator.py

Co-authored-by: Alex Moreno <[email protected]>

* Fix validation

* Modify operation test

---------

Co-authored-by: André Marcel Gutiérrez Benítez <[email protected]>
Co-authored-by: Alex Moreno <[email protected]>
…y ZOAU (#2238)

* [Bug] [zos_backup_restore] Comment test case and fixes byte removal by ZOAU (#2236)

* Commented backup test

* Default space type value to m

* Added changelog

* Updated docs

* Update 2236-space-type-default-zos_backup_restore.yml

* Updated changelogs
* 761 changes already merged to staging1.16

* chnages merged to statging v1.16 as part of 2213 PR

* resolving sanity issue in new file creation

* Updated zos_job_output

* Updated wrong line

* Updated tests

---------

Co-authored-by: Fernando Flores <[email protected]>
* Updated zos_fetch with new interface

* Updated to fix vsam errors

* Updated failing scenario

* Updated changelogs

* Added new changes

* Updated zos_fetch

* Fixed sanity issues
…ansible 2.18 (#2240)

* Updated test

* Added changelogs

* Update 2240-fix2.18-zos_zfs_resize.yml
… datasets (#2210)

* add nonscratch parameter in main module

* added support for nonscratch in module_utils

* added test case

* added fragments

* FIXED

* changed in fragments

* Updated changelogs

* reviewed comments

* fixed

* removed print statement

* removed extra validation

* [Enabler] [2053] [zos_data_set] Add_support_for_noscratch_option (#2202)

* add nonscratch parameter in main module

* added support for nonscratch in module_utils

* added test case

* added fragments

* FIXED

* changed in fragments

* Updated changelogs

* reviewed comments

* fixed

* removed print statement

* removed extra validation

---------

Co-authored-by: Fernando Flores <[email protected]>

* [Enhancement] SYSIN DDs support for zos_job_output (#2207)

* adding sysin support

* Adding the test case

* changelog addition

* sanity issue resolving

* removing redundant files

* review comments incorporation

* [Tests] [Ansible 2.19] Fix conditionals failures when executing playbooks in test cases (#2213)

* editing and testing modules

* changelog addition

* Update and rename 2202-zos_data_set-Support-noscratch-options.yml to 2210-zos_data_set-Support-noscratch-options.yml

as this branch was already merged in staging now creating new PR to merge in dev so i chnage the pull request no in fragments

* [zos_job_submit] Fix TYPRUN=COPY, TYPRUN=HOLD and TYPRUN=JCLHOLD handling (#2229)

* Fix TYPRUN handling

* Add changelog fragment

* Remove commented code

* Update module documentation

* Updated changelogs

* Updated changelogs

* Update zos_job_submit calls

* Corrected some more zos_job_submit calls

* Updated test

* Updated changelogs

* Updated changelogs

* Added comment in tests

* Updated wrong zos_copy call

---------

Co-authored-by: Fernando Flores <[email protected]>
Co-authored-by: Rohitash Goyal <[email protected]>
Co-authored-by: Alex Moreno <[email protected]>
…erface (#2243)

* Updated result and added aliases

* Added result dict

* Updated indentation

* Added expected keys in zos_blockinfile

* Added return values to the docs

* Added changelog

* Update 2243-zos_blockinfile-interface-update.yml

* Fixed tests
* Updated tests

* Updated tests

* Added changelog
* Updated interface

* Updated interface

* Updated zos_mount tests and docs

* Added a deprecation warning

* Fixed validation an pep8 issues

* Added new changelog

* Updated changelog
* Test

* Migrate zos apf

* Debug print output

* Complete migration

* Fix typo

* Fix typo

* Fix stderr

* Run specific case

* Run specific case

* Fix test

* Add fragment

* fix sanity

* Fix sanity

* Update changelogs/fragments/2250-Update_zos_apf_interface.yml

Co-authored-by: Fernando Flores <[email protected]>

* Fix comments

---------

Co-authored-by: André Marcel Gutiérrez Benítez <[email protected]>
Co-authored-by: Fernando Flores <[email protected]>
* Updated zos_lineinfile

* Fixed tests

* Added changelogs

* Corrected changelog

* Added return_content assignment to None

* Fixed docs

* [zos_lineinfile] Avoid leaving behind a temporary file when running test suite (#2258)

* Added tests

* Fixed lineinfile

* removed print statements

* Restored zos_data_set

* Updated changelog

* Updated changelogs
…2259)

* Removed zos_data_set from test_zos_volume_init

* Removed zos_data_set from zos_job_output tests

* Fixed volume init test

* Removed commented lines

* Removed commented lines

* Removed zos_data_set calls from zos_mount tests

* Commented zos_data_set from zos_backup_resore

* Removed zos_data_set from zos_mount and zos_backup_restore test cases

* Removed zos_data_set from zos_lineinfile tests

* Updated path msg

* modified blockinfile tests

* Updated blockinfile

* Fixed copy changing force to replace

* Added changelog
* Refactor name to type

* Updated tests

* Corrected some dls commands so that it only fetches for the correct data set

* Enhanced last test

* Update test_zos_archive_func.py

* Fixed test

* Modified spack keywrod

* Replace use_adrdssu keyword

* Documented dest

* Updated docs

* Updated options

* Updated aliases

* Updated format options aliaases

* Updated argument spec with format options alias

* Added changelogs

* Updated aliases

* Removed arg parser validation not needed

* Fixed zos_copy changing force to replace

* Fixed failing zos_find test case

* Updated zos_unarchive test to work with zos_archive new interface and remove zos_data_set deps

* Updated tests

* Updated tests

* Updated changelog
* Test

* Revert "Test"

This reverts commit aed8d8d.

* Migrate interface

* Debug testing

* Modify testing

* Modify test suite

* Add remove for pdspaths

* Modify fails of validations

* Complete test suite and new version

* Add fragment

* Fix sanity

* Add functions for excludes specfici members or datasets

* Fix sanity

* Add validation

* Add validation

* Add validation

* Fix variable set

* Update plugins/modules/zos_find.py

Co-authored-by: Fernando Flores <[email protected]>

* Fix find and documentation

* Fix changelog

---------

Co-authored-by: André Marcel Gutiérrez Benítez <[email protected]>
Co-authored-by: Fernando Flores <[email protected]>
… to create GDGs (#2254)

* cherry picked fix from 1.16.

* Updated changelog

* Fixed test zos_find

* Added a proper quotes in dls to avoid shell resolving when using hlq.*

* Avoid leaving temporary uss files behind

---------

Co-authored-by: Mayank Mani <[email protected]>
* Add documentation

* Delete branch_protection_rules.json

---------

Co-authored-by: André Marcel Gutiérrez Benítez <[email protected]>
* cherry picked fix from 1.16.

* Updated changelog

* Fixed test zos_find

* Merged 2251

* Added a proper quotes in dls to avoid shell resolving when using hlq.*

* Avoid leaving temporary uss files behind

* Cherry picked 2255

* Updated changelogs

* Fixed zos_find tests

* Updated zos_zfs_resize tests to add a retry to an intermittent issue

* Added assertion catch

* Updated changelog

---------

Co-authored-by: Mayank Mani <[email protected]>
Co-authored-by: Rohitash Goyal <[email protected]>
@surendrababuravella
Copy link
Collaborator Author

Good work you have done in this module. There's a lot of comments, but they're mostly documentation or reminders of how to do things more in Python's style. Another question I have about cpu_time and elapsed_time: the time returned changes depending on how long the started task has been running for, would it be too cumbersome to convert all those formats into a single one like this: hhhhh.mm.ss.ttt? I'm thinking having the same format all the time would make automation easier. Of course, special values ******** and NOTAVAIL would remain the same.

All comments I've made are probably a lot of work and you've been waiting on more reviews, so if I don't review this PR again quickly please ping me

@rexemin Thank you for the review..
'elapsed_time' has handled already. 'started_time' has created from 'elapsed_time' only.
Regarding 'cpu_time', tried to analyse multiple scenarios. The logic which is used for 'elapsed_time' is applicable for this as well. But this can be handled if needed.

Other comments are addressed.

surendrababuravella and others added 8 commits September 25, 2025 20:42
* Test

* Change documentation

* Add fragment

* Fix :

* Fix line too long

* Fix content

* Update plugins/modules/zos_replace.py

Co-authored-by: Alex Moreno <[email protected]>

* Update plugins/modules/zos_replace.py

Co-authored-by: Alex Moreno <[email protected]>

* Apply suggestions from code review

Co-authored-by: Alex Moreno <[email protected]>

* Modified zos_replace documentation with latest feedback

* Fixed documentation lint issue

* Fix O for I and new examples

* Avoid check

* Fixed a couple of sanity issues

* Updated doc source

* Updated the generated RST

* Reset docs rst

* Added replace rst

* Update plugins/modules/zos_replace.py

---------

Co-authored-by: André Marcel Gutiérrez Benítez <[email protected]>
Co-authored-by: Fernando Flores <[email protected]>
Co-authored-by: Alex Moreno <[email protected]>
Co-authored-by: Fernando Flores <[email protected]>
Copy link
Collaborator

@richp405 richp405 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surendra... I think you need to re-push your changes... the 'view changed' did not show changes that you marked as resolved. We need to see the actual changes in github before we can approve it.

@surendrababuravella
Copy link
Collaborator Author

Surendra... I think you need to re-push your changes... the 'view changed' did not show changes that you marked as resolved. We need to see the actual changes in github before we can approve it.

@richp405 this comment applicable at 2 places.. i missed updating here. Now updated..

richp405
richp405 previously approved these changes Sep 29, 2025
Copy link
Collaborator

@richp405 richp405 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few document issues remaining in zos_started_task, but not deal busters in my opinion. A nice chunk of code.

Copy link
Collaborator

@rexemin rexemin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty great, thanks for working on so many comments so quickly, I just have a couple of other corrections and some questions from last week pending

else:
module.fail_json(
rc=5,
msg="job_name is missing which is mandatory to display started task details.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are stopping a started task here

else:
module.fail_json(
rc=5,
msg="job_name is missing which is mandatory to display started task details.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are modifying a started task here

supporting task_id
filtering tasks using timestamp when state is started
commenting untested options.
Adding testcases
fernandofloresg and others added 3 commits October 8, 2025 14:26
Updated logic related to handling duplicate tasks
Updated format of cpu_time and elapsed_time
@surendrababuravella surendrababuravella changed the base branch from dev to staging-v1.16.0-beta.1 October 10, 2025 13:43
@surendrababuravella surendrababuravella marked this pull request as draft October 15, 2025 14:08
@surendrababuravella
Copy link
Collaborator Author

Another PR raised... #2377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants